* remove a few old kludges that are no longer needed.
* clean up upgrade a bit
"GPSBabel Version " doesn't need to be removed from currentVersionIn
in UpgradeCheck::checkForUpgrade,
that is taken care of in MainWindow::findBabelVersion
#include "preferences.h"
-#include "../gbversion.h"
class FormatListEntry : public QListWidgetItem
{
ui_.startupCheck->setChecked(babelData_.startupVersionCheck_);
ui_.reportStatisticsCheck->setChecked(babelData_.reportStatistics_);
ui_.ignoreVersionMismatchCheck->setChecked(babelData_.ignoreVersionMismatch_);
- // Because of an unfortunate bug in 1.4.0, we turn this off in 1.4.1.
- if (VERSION == QString("1.4.1")) {
- babelData_.ignoreVersionMismatch_ = false;
- }
connect(ui_.buttonBox, &QDialogButtonBox::accepted, this, &Preferences::acceptClicked);
connect(ui_.buttonBox, &QDialogButtonBox::rejected, this, &Preferences::rejectClicked);
bool allowBeta)
{
currentVersion_ = currentVersionIn;
- currentVersion_.remove("GPSBabel Version ");
QDateTime soonestCheckTime = lastCheckTime.addDays(1);
if (!testing && QDateTime::currentDateTime() < soonestCheckTime) {
// Not time to check yet.
- return UpgradeCheck::updateUnknown;
+ return updateUnknown;
}
manager_ = new QNetworkAccessManager;
replyId_ = manager_->post(request, args.toUtf8());
- return UpgradeCheck::updateUnknown;
+ return updateUnknown;
}
QDateTime UpgradeCheck::getUpgradeWarningTime()
UpgradeCheck(QWidget* parent, QList<Format>& formatList, BabelData& bd);
~UpgradeCheck();
- typedef enum {
+ enum updateStatus {
updateUnknown,
updateCurrent,
updateNeeded,
- } updateStatus;
+ };
UpgradeCheck::updateStatus checkForUpgrade(const QString& babelVersion,
const QDateTime& lastCheckTime,
precision = atol(opt_precision);
writer->writeStartDocument();
- // FIXME: This write of a blank line is needed for Qt 4.6 (as on Centos 6.3)
- // to include just enough whitespace between <xml/> and <gpx...> to pass
- // diff -w. It's here for now to shim compatibility with our zillion
- // reference files, but this blank link can go away some day.
- writer->writeCharacters(QStringLiteral("\n"));
writer->setAutoFormatting(true);